package ModelLayer;

/**
 * This class creates objects of a privateCustomer that holds information of a customer who can make an order
 * 
 * @author (dmab0913 Gruppe4) 
 * @version (a version number or a date)
 */
public class PrivateCustomer
{
    private int account;
    private String name;
    private String address;
    private String phone;
    private int postalCode;
    private String city;
    private String email;

    /**
     * Constructor for objects of class PrivateCustomer
     */
    public PrivateCustomer(int account, String name, String address, String phone, int postalCode, String city, String email)
    {
        // initialise instance variables
        this.account = account;
        this.name = name;
        this.address = address;
        this.phone = phone;
        this.postalCode = postalCode;
        this.city = city;
        this.email = email;
    }

    /**
     * accessor method to get name of a privateCustomer
     */
    public String getName()
    {
        return name;
    }

    /**
     * accessor method to get account information of a privateCustomer
     */
    public int getAccount()
    {
        return account;
    }

    /**
     * get method for address 
     */
    public String getAddress()
    {
        return address;
    }

    /**
     * get method for phone
     */
    public String getPhone()
    {
        return phone;
    }

    /**
     * get method for postal code
     */
    public int getPostalCode()
    {
        return postalCode;
    }

    /**
     * get method for city
     */
    public String getCity()
    {
        return city;
    }

    /**
     * get method for email
     */
    public String getEmail()
    {
        return email;
    }

    /**
     * mutator method to set an account
     */
    public void setAccount(int newAccount)
    {
        account = newAccount;
    }

    /**
     * mutator method to set a name
     */
    public void setName(String newName)
    {
        name = newName;
    }

    /**
     * mutator method to set an address
     */
    public void setAddress(String newAddress)
    {
        address = newAddress;
    }

    /**
     * mutator method to set a phone number
     */
    public void setPhone(String newPhone)
    {
        phone = newPhone;
    }

    /**
     * mutator method to set a postal code
     */
    public void setPostalCode(int newPostalCode)
    {
        postalCode = newPostalCode;
    }

    /**
     * mutator method to set a city
     */
    public void setCity(String newCity)
    {
        city = newCity;
    }

    /**
     * mutator method to set an email
     */
    public void setEmail(String newEmail)
    {
        email = newEmail;
    }

    /**
     * mutator methed to set all fields
     */
    public void updatePrivateCustomer(String newName, String newAddress, String newPhone, int newPostalCode, String newCity, String newEmail)
    {
        name = newName;
        address = newAddress;
        phone = newPhone;
        postalCode = newPostalCode;
        city = newCity;
        email = newEmail;
    }
}
